Skip to content

[3.15] gh-153333: Read tkinter profile scripts with the source file's encoding (GH-153334)#153541

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
serhiy-storchaka:backport-bac73b0-3.15
Jul 11, 2026
Merged

[3.15] gh-153333: Read tkinter profile scripts with the source file's encoding (GH-153334)#153541
serhiy-storchaka merged 1 commit into
python:3.15from
serhiy-storchaka:backport-bac73b0-3.15

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 11, 2026

Copy link
Copy Markdown
Member

Tk.readprofile ran the user's ~/.CLASS.py and ~/.BASE.py scripts with exec(open(path).read()), decoding them with the locale encoding. Read them in binary mode so exec() honors each script's own coding cookie. (cherry picked from commit bac73b0)

…file's encoding (pythonGH-153334)

Tk.readprofile ran the user's ~/.CLASS.py and ~/.BASE.py scripts with
exec(open(path).read()), decoding them with the locale encoding.  Read
them in binary mode so exec() honors each script's own coding cookie.
(cherry picked from commit bac73b0)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) July 11, 2026 04:53
@serhiy-storchaka serhiy-storchaka merged commit ae42632 into python:3.15 Jul 11, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants